const mongoose = require("mongoose");

const UserSchema = new mongoose.Schema({
	openId: {
		type: String,
		required: [true, "Please add a openId"],
	},
	createdAt: {
		type: Date,
		default: Date.now,
	},
	token: {
		type: String,
		default: new mongoose.Types.ObjectId(),
	},
});

module.exports = mongoose.model("User", UserSchema);
